package com.henu.engineer.dao.mapper

import com.henu.engineer.dao.entity.Audit
import org.apache.ibatis.annotations.Mapper
import org.springframework.stereotype.Repository
import java.time.LocalDate


@Mapper
@Repository
interface AuditXmlMapper{

    /**
     * 增加审批表
     * 其中type status upload_teacher_id 为必填项
     */
    fun addAudit(type:Int,status:Int,uploadTeacherId:String,filename:String):Boolean

    /**
     * 查询所有的审批表中status=? type=?的数据并返回
     */

    fun selectAuditByStatus1(type:Int,status: Int):List<Audit>

    /**
     * 更改审批表1 添加审核人
     */

    fun updateAuditTeacherByID(id:Int,status: Int,auditTeacherId: String,auditorsComment:String,auditedDate: LocalDate):Boolean

    /**
     * 更改审批表1 添加审批人
     */
    fun updateapproveTeacherByID(id:Int,status: Int,approveTeacherId: String,approversComment: String,approvedDate: LocalDate):Boolean


    /**
     * 通过id查询filename
     */

    fun selectFilenameByID(id: Int):String

}